
package unamur.iodass.ws.catalogserv;

import java.util.ArrayList;

import unamur.iodass.catalog.RetreiveAllCatalogs;
import unamur.iodass.communication.messages.Book;

/**
 * This class is the implementation of JAX-WS Endpoint for prodiving a Catalog
 * 
 * @author Cherchem, Marchal
 * @version 1.0  15/05/2013
 */

public class CatalogServ {

	/**
	 * Constructor
	 */
	public void CatalogServ() {
	}

	/**
	 * Récupère les catalogues afin de fournir le catalogue de la bibliothèque
	 * au webservice
	 * @return catalog
	 */
	public ArrayList<Book> getCatalog() {
		ArrayList<Book> books ;
		// demande de recevoir les catalogues
		RetreiveAllCatalogs retreiveAllCatalogs = RetreiveAllCatalogs.getInstance();
		books = retreiveAllCatalogs.getBooksOfLibrary();
		return books ;
	}
}
